﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MediaLibraryManagement.Entity;
using MediaLibraryManagement.DAL;

namespace MediaLibraryManagement.BLL
{
    public class ArtistBLL
    {
       private ArtistDAL _dataAccess;
        public ArtistBLL()
        {
            _dataAccess = new ArtistDAL();
        }

        public Artist GetArtistByID(int id)
        {
            return (Artist)_dataAccess.GetByID(id);
        }

        public void Insert(Artist artist)
        {
            _dataAccess.Insert(artist);
        }

        public void Update(Artist artist)
        {
            _dataAccess.Update(artist);
        }

        public void Delete(int id)
        {
            _dataAccess.Delete(id);
        }

        public List<Artist> Search(string name, string company, string country)
        {
            return (List<Artist>)_dataAccess.Search(name, company, country);
        }
    }
}
